home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 32 / uswar.zip / US.PAS < prev    next >
Pascal/Delphi Source File  |  1980-01-01  |  3KB  |  106 lines

  1. Program USINIT;
  2.  
  3. {This module will display the title panel and determine if instructions
  4. are to be displayed.  Campaign will be selected. Module to select
  5. navy will be chained.
  6.  
  7. Display title
  8. If display instructions
  9. .   Do until last page shown
  10. .   .   Page instructions from external file
  11. .   .   Display page
  12. .   .   Wait for entry or time out
  13. .   End
  14. End
  15. Display campaign selections
  16. Select campaign
  17. Chain NAVY Module}
  18.  
  19. {$I common.pas}
  20. {$I putpic.pas}
  21. {$I border.pas}
  22.  
  23. Procedure Rtn2cont;
  24. Begin
  25.       gotoxy(26,21);
  26.       FastWrite('PRESS ANY KEY TO CONTINUE',15,0,1);
  27.       uncursor;
  28.       read(kbd,c);
  29. end;
  30.  
  31. Begin
  32. Clrscr;
  33. Border(34,10,16,8,1,7,0);
  34. border(36,11,11,6,1,7,0);
  35. window(39,12,44,15);
  36. clrScr;
  37. NormVideo;
  38. writeln('W A R');
  39. writeln(' O N ');
  40. writeln('T H E');
  41. write('S E A');
  42. Window(1,1,80,25);
  43. gotoxy(27,22);                                          {Display instructions}
  44. FastWrite('DO YOU WANT INSTRUCTIONS(Y/N)? ',15,0,1);
  45. uncursor;
  46. Read(kbd,c);
  47. If (c='Y') or (c='y') then
  48.    begin
  49.       Clrscr;
  50.       Border(1,1,79,23,1,7,0);
  51.       window(3,2,78,22);                                {Set instr window}
  52.       Assign(Source,'us.ins');                          {Set to read instr data}
  53.       Reset(Source);
  54.       i:=1;                                       {Read instr line and disp}
  55.       repeat                                      {until .page found}
  56.          Gotoxy(2,i);
  57.          i:=i+1;
  58.          Readln(Source,Line);
  59.          if (line<>'.page') then
  60.             FastWrite(Line,15,0,2)
  61.          else
  62.             begin
  63.                i:=1;
  64.                Rtn2Cont;                      {Display return to continue}
  65.                ClrScr;
  66.             end;
  67.       until EOF(Source);
  68.       Rtn2Cont;                               {Display return to continue}
  69.       ClrScr;
  70.    end;
  71. Window(1,1,80,24);
  72. Clrscr;
  73. Border(1,1,79,23,1,7,0);                      {Select campaign to fight}
  74. Gotoxy(30,8);
  75. Fastwrite('CAMPAIGNS AVAILABLE',7,0,1);
  76. Gotoxy(25,10);
  77. Fastwrite('1. ATLANTIC (English vs. German)',7,0,1);
  78. Gotoxy(25,11);
  79. FastWrite('2. ATLANTIC (German vs. English)',7,0,1);
  80. Gotoxy(25,12);
  81. Fastwrite('3. PACIFIC  (US vs. Japan)',7,0,1);
  82. Gotoxy(25,13);
  83. Fastwrite('4. BATTLEWAGONS (Hypothetical)',7,0,1);
  84. Gotoxy(25,14);
  85. Fastwrite('5. SOLOMONS  (Japan vs. US)',7,0,1);
  86. Gotoxy(25,15);
  87. Fastwrite('6. SPECIAL BATTLES (English vs. Germany)',7,0,1);
  88. Gotoxy(25,16);
  89. Fastwrite('7. HYPOTHETICAL (USA vs. Germany)',7,0,1);
  90. Gotoxy(25,22);
  91. Fastwrite('Enter campaign number to continue',7,0,1);
  92. uncursor;
  93. read(kbd,c);
  94. Name:='atlantic';                          {Default to atlantic campaign.}
  95. case c of
  96.   '2' : Name:='atlanti2';
  97.   '3' : Name:='pacific';
  98.   '4' : Name:='pacific2';
  99.   '5' : Name:='solomons';
  100.   '6' : Name:='specbat';
  101.   '7' : Name:='hypoth';
  102. end; {case}
  103. quitsw:=0;
  104. Assign(nextprog,'navy.chn');
  105. Chain(nextprog);
  106. end.